import request from '@/utils/request'
// import {AddResponse} from '@/api/classroom/type'

enum API {
  STUPAGEINFO = '/stuInfoListPage/',
  ASSIGNUPDATECLASSES = '/addOrUpdateStuInfo/', 

  STUINFOBYNAME = '/stuInfoByNameAadPage/',
  GETSTUBYNAMEANDCLASSLEVELS = 'getStuByNameAndClassLevels'
}
/**
 * 查全部数据
 * @param currentPage 当前页
 * @param limit       显示数据条数
 */
export const reqstupageinfo = (currentPage: number, limit: number) => request.get(API.STUPAGEINFO + `${currentPage}/${limit}`)

  // 传一个对象,添加或修改
  export const reqAssignUpdateClasses = (stuInfo: any) => request.post(API.ASSIGNUPDATECLASSES, stuInfo)

  //多条件分页查询 ,通过姓名&年级 
  export const getStuByNameAndClassLevels = (currentPage: number, limit: number,stuname: string,classLevels: string[]) => request.get(API.GETSTUBYNAMEANDCLASSLEVELS + `/${currentPage}/${limit}/${stuname}?classLevels=${classLevels}`)

